{extend name="$admin_layout" /}
{block name="content"}
<script src="__PLUG__/layer/laydate/laydate.js?v={:config('asset_version')}"></script>
<div class="row">
    <div class="col-md-12">
        <div class="box nav-tabs-custom" style="border-top: 0;">	    
			<ul class="nav nav-tabs">
				<li {if condition="!isset($active)"}class="active"{/if} > <a href="{:url('order/order/cut')}">{:lang('全部')}</a> </li>
				{volist name="tab_list" id="tab"}
				<li {if strval($field) === strval($tab['field'])}{if strval($active) === strval($tab['value']) }class="active"{/if}{/if}> 
				    <a href="{$tab.url}">{$tab.title}</a> 
				</li>
				{/volist}
		    </ul>
			<div class="box-body">
				<div class="tab-pane active">
					<div class="row">
						<form action="" method="get" class="marBtm">
								<div class="col-md-2 col-xs-6">
										<span class="txt">{:lang('订单号')}：</span>
										<input type="text" class="form-control" name="order_sn" placeholder="{:lang('请输入订单号')}" value="{:input('param.order_sn')}">
								</div>
								<div class="col-md-3 col-xs-6">
									<span class="txt">{:lang('创建时间')} ：</span>
									<input type="date" class="form-control js-date" readonly name="create_time" placeholder="{:lang('请输入日期')}" value="{$Think.get.create_time}">
								</div>
							<div class="col-md-2 col-xs-6" style="padding-top: 18px;">
								<button class="btn btn-primary btn-flat" type="submit">{:lang('搜索')}</button> <button class="btn btn-danger btn-flat" type="button" onclick="clearinput()">{:lang('重置')}</button>
							</div>
						</form>
					</div>
				</div>
			</div>
            <div class="box-body">
                <div class="tab-pane active">
                    <table class="table table-builder table-hover table-bordered table-striped mb10">
                        <thead>
                            <th class="text-center" style="width: 55px;">
                                <input class="minimal-red checkboxCtrl" data-group="ids[]" data-toggle="icheck" type="checkbox">
                            </th>
                            <th class="">{:lang('订单')}ID</th>
                            <th class="">{:lang('订单号')}</th>
                            <th class="">{:lang('下单人')}</th>
                            <th class="">{:lang('订单金额')}</th>
                            <th class="">{:lang('应付金额')}</th>
                            <th class="">{:lang('实付金额')}</th>
                            <th class="">{:lang('已砍金额')}</th>
                            <th class="">{:lang('支付状态')}</th>
                            <th class="">{:lang('支付类型')}</th>
                            <th class="text-center">{:lang('订单状态')}</th>
                            <th class="text-center">{:lang('创建时间')}</th>
                            <th class="text-center">{:lang('操作')}</th>
                        </thead>
                        <tbody>
                            {volist name="list" id="o"}
                            <tr>
                                <td class="text-center" style="width: 55px;"><input class="ids minimal-red" data-toggle="icheck"
                                        type="checkbox" name="ids[]" value="{$o.aid}"></td>
                                <td class=""> {$o.aid}
                                </td>
                                <td class=""> {$o.order_sn}
                                </td>
                                <td class=""> {$o.user_id|get_nickname}
                                </td>
                                <td class=""> {$o.order_money}
                                </td>
                                <td class=""> {$o.payable_money}
                                </td>
                                <td class=""> {$o.real_money}
                                </td>
                                <td class=""> {$o.cut_price}
                                </td>
                                <td class="">
                                    <span class="label label-flat {if condition='$o.pay_status==0'}label-warning{else/}label-success{/if}">{$o.pay_status_name}</span>
                                </td>
                                <td class="">
                                {if condition="$o['pay_status'] == 1"}
                                 {if condition="$o['pay_type'] == 'alipay'"}
                                 		<span class="label label-flat label-success"> {:lang('支付宝')} </span>
                                 {elseif condition="$o['pay_type'] == 'wxpay'"}	
                                      	<span class="label label-flat label-success"> {:lang('微信')} </span>	
							     {elseif condition="$o['pay_type'] == 'minipay'"}	
                                      	<span class="label label-flat label-success"> {:lang('小程序')} </span>
								 {elseif condition="$o['pay_type'] == 'balance'"}	
                                      	<span class="label label-flat label-default"> {:lang('余额')} </span>
                                 {/if}
                                {/if}
                                </td>
                                <td class="text-center">
                                    <span class="label label-flat {if condition='$o.status==0 or $o.status==-1'}label-warning{else/}label-success{/if}">{$o.status_name}</span>
                                </td>
                                <td class="text-center">{$o.create_time|date="Y-m-d H:i:s"}</td>
                                <td class="text-center">
								<a ident="download" title="{:lang('打印')}" href="{:url('download',['order_sn'=>$o['order_sn']])}" class="mr5">{:lang('打印')}</a> |
                                <a ident="edit" title="{:lang('详情')}" href="{:url('detail',['order_sn'=>$o['order_sn']])}" class="mr5">{:lang('详情')}</a>
                                    {if condition="$o.status == 1"}
									|
                                <a ident="shipping" title="{:lang('发货')}" href="{:url('express_add',['order_sn'=>$o['order_sn']])}" class="mr5">{:lang('发货')}</a>
                                    {/if}
                                <!---<a ident="delete" title="{:lang('删除')}" icon="fa fa-times pr5" class="btn btn-xs mr5 btn-default btn-flat ajax-get confirm"><i class="fa fa-times pr5"></i>{:lang('删除')}</a>-->
                                </td>

                            </tr>
                            {/volist}
                        </tbody>
                    </table>
                    <div class="data-table-toolbar">
                        <div class="row">
                            {$pages|raw}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}
